//
//  YDStockMarketRiseFallModel.m
//  PeiZiWangBei
//
//  Created by LK-IOS on 2018/1/29.
//  Copyright © 2018年 LK-IOS. All rights reserved.
//

#import "YDStockMarketRiseFallModel.h"

@implementation YDStockMarketRiseFallModel

-(NSString *)persentUpDown
{
    if (!self.upDropSpeed) {
        return @"--";
    }else{
        NSString *persentString = [self.upDropSpeed pz_stringNumberByMultiplyingBy:@"100"];
        return [NSString stringWithFormat:@"%@%@",persentString , @"%"];
    }
}
-(NSString *)pzLastPrice
{
    if (!self.lastPrice) {
        return @"--";
    }else{
        NSString *persentString = [self.lastPrice pz_stringNumberByMultiplyingBy:@"1"];
        return persentString;
    }
}

-(PZHomeReModelPriceColor)priceColor
{
    if (!self.upDropSpeed) {
        return Price_Other;
    }else{
        if ([self.upDropSpeed floatValue] >= 0) {
            return Price_Up;
        }else if ([self.upDropSpeed floatValue] == 0.0){
            return Price_Other;
        }else{
            return Price_Down;
        }
    }
}

@end
